package cn.bonoon.controllers.smm;

import cn.bonoon.kernel.annotations.OptionArray;
import cn.bonoon.kernel.support.models.AbstractItem;
import cn.bonoon.kernel.web.annotations.grid.AsColumn;
import cn.bonoon.kernel.web.annotations.grid.AsDataGrid;
import cn.bonoon.kernel.web.annotations.grid.GridOptions;
import cn.bonoon.kernel.web.annotations.grid.OperationType;

@AsDataGrid(condition = LoginCondition.class, value = @GridOptions(operation = OperationType.LEFT, checkbox = false, sortName = "loginAt", sortOrder = "desc"))
public class LoginItem extends AbstractItem {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7095352380655859759L;

	@AsColumn(name = "用户账号", width = 100)
	private String loginName;
	@AsColumn(name = "用户名称", width = 150)
	private String userName;

	@AsColumn(name = "登录时间", width = 130)
	private String loginAt;

	@AsColumn(name = "登录IP", width = 110)
	private String loginIp;

	/**
	 * 登录是否成功
	 */
	@AsColumn(name = "状态", width = 50)
	@OptionArray({ "失败", "<font style='color:red'>成功</font>" })
	private String loginsuccess;

	/**
	 * 
	 * 附加信息，如果登录失败，则显示登录失败的原因， 如果登录成功，则显示登录者的浏览器相关的信息
	 * 
	 */
	@AsColumn(name = "登录信息", width = 450)
	private String additionalInfo;

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getLoginAt() {
		return loginAt;
	}

	public void setLoginAt(String loginAt) {
		this.loginAt = loginAt;
	}

	public String getLoginIp() {
		return loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}

	public String getAdditionalInfo() {
		return additionalInfo;
	}

	public void setAdditionalInfo(String additionalInfo) {
		this.additionalInfo = additionalInfo;
	}

	public String getLoginsuccess() {
		return loginsuccess;
	}

	public void setLoginsuccess(String loginsuccess) {
		this.loginsuccess = loginsuccess;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

}
